package com.cd2cd.code_template.service.impl;

import com.cd2cd.code_template.code_template.domain.SysAuth;
import com.cd2cd.code_template.code_template.domain.gen.SysAuthCriteria;
import com.cd2cd.code_template.code_template.mapper.SysAuthMapper;
import com.cd2cd.code_template.configuration.constants.ServiceCode;
import com.cd2cd.code_template.service.CommService;
import com.cd2cd.code_template.vo.BaseRes;
import com.cd2cd.code_template.vo.SysAuthVo;
import com.cd2cd.code_template.vo.SysRouteVo;
import org.springframework.stereotype.Component;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Component
public class CommServiceImpl implements CommService {

    @Resource
    private SysAuthMapper sysAuthMapper;

    @Override
    public BaseRes<List<SysRouteVo>> getAllRoute() {

        List<SysRouteVo> sysRoutes = sysAuthMapper.selectAllRoutes();

        return new BaseRes<>(sysRoutes,ServiceCode.SUCCESS);
    }
}
